<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorator="~{common/admin-edit-template}">
<head>
    <title>修改</title>
</head>
<body class="hold-transition skin-green-light  sidebar-mini">

<div layout:fragment="content">
    <!-- Content Header (Page header) -->

    <!-- Main content -->
    <section class="content container-fluid">
        <!-- edit or add box -->
        <div class="page-edit box box-default" data-widget="box-widget">

            <form id="form-oper" role="form" data-toggle="validator">
                <input id="hidden-id" type="hidden" name="id" th:value="${entity.id}">
                <div class="box-body">
                    <div class='form-group '>
                        <label>名称</label>
                        <input class='form-control' type='text' name="name" th:value="${entity.name}"
                               maxlength="20" required>
                        <div class='help-block with-errors'></div>
                    </div>
                    <div class='form-group '>
                        <label>备注</label>
                        <input class='form-control' type='text' name="remarks" th:value="${entity.remarks}"
                               maxlength="20"
                               required>
                        <div class='help-block with-errors'></div>
                    </div>

                    <div class='form-group '>
                        <label>元素模板</label>
                        <div class="alert alert-warning alert-dismissible">
                            <p>
                                在下面填写元素的模板，格式类似:
                                <code>

                                    &lt;input class=&#x27;form-control&#x27; type=&#x27;text&#x27; name=&quot;{attribute}&quot;
                                    th:value=&quot;{value}&quot;
                                    {validate}&gt;
                                </code>
                                <br/>
                                在需要替换的地方用参数替换
                                <br/>
                                现在支持以下参数:
                            <ul>
                                <li>{attribute} :属性名</li>
                                <li>{value} :值</li>
                                <li>{validate} : 验证信息，如是否必填，长度限制等等；一般情况下必须填</li>
                            </ul>
                            </p>
                        </div>
                        <textarea class="form-control" name="elTemplate" cols="10"
                                  th:text="${entity.elTemplate}"></textarea>
                        <div class='help-block with-errors'></div>
                    </div>
                </div>
                <!-- /.box-body -->
                <div class="box-footer">
                    <button type="button" class="btn btn-danger pull-right" onclick="operate.cancel()">取消</button>
                    <button type="submit" class="btn btn-primary pull-right btn-submit">提交
                    </button>
                </div>
                <!-- /.box-footer -->
            </form>
            <!--/.form -->
            <div class="overlay" style="display: none">
                <i class="fa fa-refresh fa-spin"></i>
            </div>
            <!-- /.loading overlay-->
        </div>
        <!-- /.edit or add box -->
    </section>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->


<div layout:fragment="page-js">

    <script src="/dist/js/pages/generatecode/plugin/plugin-edit.js"></script>
</div>


</body>
</html>